#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution
{
public:
    int percentageLetter(string s, char letter)
    {
        cout << count(s.begin(), s.end(), letter) << endl;
        return (double)count(s.begin(), s.end(), letter) / s.length() * 100;
    }

    int percentageLetter_1(string s, char letter) {
        int n = s.size();
        int cnt = 0;
        for (char ch: s) {
            if (ch == letter) {
                ++cnt;
            }
        }
        return 100 * cnt / n;
    }
};
int main()
{

    system("pause");
    return 0;
}
